<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 86131
  Date: 2022/3/31
  Time: 21:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>

<link rel="stylesheet" href="https://www.layuicdn.com/layui-v2.5.5/css/layui.css">
<script src="https://www.layuicdn.com/layui-v2.5.5/layui.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<html>
<head>
    <title>主界面</title>

</head>
<body>

<div class="top-nav">
    <ul class="layui-nav" lay-bar="disabled">
        <li class="layui-nav-item">
            <a href="" target="_self" target="iframe">浏览</a>
        </li>

        <li class="layui-nav-item">
            <a href="${pageContext.request.contextPath}/add" target="_self" target="iframe">添加</a>
        </li>

        <li class="layui-nav-item" lay-unselect="" style="margin-left: 70%">
            <span>${teacher}</span>
            <dl class="layui-nav-child">
                <dd><a href="javascript:;">子级菜单</a></dd>
                <dd><a href="javascript:;">横线隔断</a></dd>
                <hr>
                <dd style="text-align: center;"><a href="/logout">退出</a></dd>
            </dl>
        </li>
    </ul>
</div>
<div id="stu_list">
    <iframe width="100%" style="height: 84%;width: 99%;" src="${pageContext.request.contextPath}/allStudents" frameborder="1"></iframe>
</div>
<%--导航的hover效果、二级菜单等功能，需要依赖element模块--%>
<script>
    layui.use('element', function(){
        var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
        //监听导航点击
        element.on('nav(demo)', function(elem){
            layer.msg(elem.text());
        });
    });

</script>

</body>
</html>
